﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace FichoWeb.Models
{
    public class Blog
    {
        public Blog()
        {
            this.Comments = new HashSet<Comment>();
        }

        public int Id { get; set; }
        public string Name { get; set; }
        public string Description { get; set; }
        private DateTime? _Date = null;
        public DateTime Date
        {
            get
            {
                return this._Date.HasValue ? this._Date.Value : DateTime.Now;
            }
            set
            {
                this._Date = value;
            }
        }
        public virtual ICollection<Comment> Comments { get; set; }
    }
}